﻿<catel:UserControl x:Class="Catel.Examples.AdvancedDemo.Views.MainPage"
				   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
				   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
				   xmlns:catel="http://catel.codeplex.com">

    <!-- Resources -->
    <UserControl.Resources>
    </UserControl.Resources>

    <!-- Content -->
    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" MinHeight="15" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <TextBlock Grid.Row="0" Grid.ColumnSpan="3" TextWrapping="Wrap">
            This demo application shows a lot of advaned features of Catel. One of the example is the difference between
            using MVVM providers as behavior or implementing the logic in the view base. Happy clicking around :)
        </TextBlock>

        <!-- Windows -->
        <StackPanel Grid.Row="2" Grid.Column="0" Orientation="Vertical">
            <TextBlock Text="Windows" />
            <Button Command="{Binding ShowWindowLogicInViewBase}" Content="Window logic in ViewBase" Style="{StaticResource FixedSizeButtonStyle}" />
            <Button Command="{Binding ShowWindowLogicInBehavior}" Content="Window logic in Behavior" Style="{StaticResource FixedSizeButtonStyle}" />
        </StackPanel>

        <!-- User controls -->
        <StackPanel Grid.Row="2" Grid.Column="1">
            <TextBlock Text="User Controls" />
            <Button Command="{Binding ShowNestedUserControlsLogicInViewBase}" Content="User controls logic in ViewBase" Style="{StaticResource FixedSizeButtonStyle}" />
            <Button Command="{Binding ShowNestedUserControlsLogicInBehavior}" Content="User controls in Behavior" Style="{StaticResource FixedSizeButtonStyle}" />
        </StackPanel>

        <!-- Misc -->
        <StackPanel Grid.Row="2" Grid.Column="2">
            <TextBlock Text="Miscellaneous" />
            <StackPanel>
                <CheckBox Content="Is IPleaseWaitService indeterminate" IsChecked="{Binding IsPleaseWaitIndeterminate, Mode=TwoWay}" />

                <Button Command="{Binding ShowPleaseWaitWindowViaServiceLocator}" Content="PleaseWaitWindow via ServiceLocator" Style="{StaticResource FixedSizeButtonStyle}" />
                <Button Command="{Binding ShowPleaseWaitWindowViaMEF}" Content="PleaseWaitWindow via MEF" Style="{StaticResource FixedSizeButtonStyle}" />
                <Button Command="{Binding ShowPleaseWaitWindowViaUnity}" Content="PleaseWaitWindow via Unity" Style="{StaticResource FixedSizeButtonStyle}" />

                <Button Command="{Binding ShowWindowWithBehaviors}" Content="Behaviors" Style="{StaticResource FixedSizeButtonStyle}" />
            </StackPanel>
        </StackPanel>
    </Grid>

</catel:UserControl>
